package org.example.reemploymentsys.controller;

import org.example.reemploymentsys.entity.UserTb;
import org.example.reemploymentsys.repository.UserTbRe;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class LimitController {
    @Autowired
    private UserTbRe userTbRe;
    @PostMapping("/updateAdminInfo")
    public String updateAdminInfo(@RequestBody UserTb userTb){
        userTbRe.save(userTb);
        return "success";
    }
    @DeleteMapping("/deleteAdminInfo/{id}")
    public String deleteAdminInfo(@PathVariable Long id){
        userTbRe.deleteById(id);
        return "success";
    }
}
